home *** CD-ROM | disk | FTP | other *** search
- ;
- ; Sample source file for the Zilog Z80
- ;
- ; (this program does not do anything, it is only an example)
- ;
- title Sample source file
- ;
- ; Definitions
- ;
- cr equ 0dh ;carriage return
- lf equ 10 ;line feed
- RAM: equ 2000h ;memory start
- ppi0 equ 8000h ;ppi 0
- crppi0 equ ppi0+1 ;control register
- srppi0 equ ppi0+2 ;status register
- flag equ 123 ;flag bit
- offset defl 0
- ;
- ; Variables
- ;
- org RAM ;variables
- key defs 16 ;key buffer
- loop1:
- offset defl 9
- ;
- ; Program
- ;
- ld a,'*'
- ld h,a
- daa
- push ix
- ld bc,messg1+offset
- jp c,loop1
- out (c),a
- ld a,(ix+3)
- call delay
- jp loop1
- ;
- ; Delay routine
- ;
- delay: dec h
- jp nz,delay
- ret
- ;
- ; Dummy data
- ;
- routines defw 1234h,0f800h,0 ;routine addresses
- messg1 defb cr,lf,'String no 1.',0
- messg2 defb cr,lf,lf,'Press a key.',0
- end